//
//  ContentTableViewCell.m
//  美食百科
//
//  Created by dllo on 16/1/28.
//  Copyright © 2016年 doll. All rights reserved.
//

#import "ContentTableViewCell.h"
@interface ContentTableViewCell()

@end
@implementation ContentTableViewCell

- (void)dealloc
{
    [_labelOne release];
    [_labelTwo release];
    [_labelThree release];
    [super dealloc];
}

-(id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    if (self) {
        self.labelOne = [[UILabel alloc]init];
        self.labelOne.textAlignment = NSTextAlignmentLeft;
        self.labelOne.textColor = self.color;

        [self.contentView addSubview:self.labelOne];
        [_labelOne release];
        
        self.labelTwo = [[UILabel alloc]init];
        self.labelTwo.textAlignment = NSTextAlignmentRight;
        self.labelTwo.font = [UIFont systemFontOfSize:14];
        self.labelTwo.textColor = self.color;

        [self.contentView addSubview:self.labelTwo];
        [_labelTwo release];
        
        self.labelThree = [[UILabel alloc]init];
        self.labelThree.textAlignment = NSTextAlignmentRight;
        self.labelThree.textColor = self.color;
        self.labelThree.font = [UIFont systemFontOfSize:14];
        [self.contentView addSubview:self.labelThree];
        [_labelThree release];
        
    }
    
    return self;
}



-(void)layoutSubviews
{
    [super layoutSubviews];
    
    self.labelOne.frame =CGRectMake(10, 0, (self.bounds.size.width-40)/3, self.bounds.size.height);
    self.labelTwo.frame =CGRectMake(self.labelOne.frame.origin.x+self.labelOne.frame.size.width+10, 0, (self.bounds.size.width-40)/3, self.bounds.size.height);
    self.labelThree.frame =CGRectMake(self.labelTwo.frame.origin.x+self.labelTwo.frame.size.width+10, 0, (self.bounds.size.width-40)/3, self.bounds.size.height);

}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
